package com.assisjrs.jpaandroid.sample.basic;

import java.util.List;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

public class CostumerAdapter extends BaseAdapter<Costumer> {
	public CostumerAdapter(final Context ctx, final List<Costumer> costumers) {
		super(ctx, costumers);
	}

	public View getView(final int position, final View v, final ViewGroup vg) {
		final Costumer item = listItens.get(position);
		final View view = inflater.inflate(android.R.layout.two_line_list_item, null);

		final TextView firstName = (TextView) view.findViewById(android.R.id.text1);
		firstName.setText(item.getFirstName());

		final TextView lastName = (TextView) view.findViewById(android.R.id.text2);
		lastName.setText(item.getLastName());

		return view;
	}
}
